Returns an object that represents a strictly typed value referring to the Uno type system.
Uno タイプを明示的に指定された値を示すオブジェクトを返します。
This object is automatically converted to an Any of the corresponding type when passed to Uno. The type must be specified by its fully qualified Uno type name.
このオブジェクトは Uno に渡す際に、自動的に該当する Any タイプに変換されます。これらのタイプ指定は、完全な Uno タイプ名を指定する必要があります。
![]() | The Office API frequently uses the Any type. It is the counterpart of the Variant type known from other environments. The Any type holds one arbitrary Uno type and is used in generic Uno interfaces.
Office API では Any タイプがよく使われます。これは、他の環境で使われる Variant タイプと対をなすものです。Any タイプは一般の Uno インタフェースで利用されているもので、任意の Uno タイプを 1 つ格納できます。 |
oUnoValue = CreateUnoValue( "[]byte", MyBasicValue ) to get a byte sequence.
oUnoValue = CreateUnoValue( "[]byte", MyBasicValue ) でバイトシーケンスを取得します。
If CreateUnoValue cannot be converted to the specified Uno type, and error occurs. For the conversion, the TypeConverter service is used.
指定した Uno タイプへの CreateUnoValue による変換ができない場合は、エラーが発生します。変換には TypeConverter サービスを使用します。
This function is intended for use in situations where the default Basic to Uno type converting mechanism is insufficient. This can happen when you try to access generic Any based interfaces, such as XPropertySet::setPropertyValue( Name, Value ) or X???Container::insertBy???( ???, Value ), from Office Basic. The Basic runtime does not recognize these types as they are only defined in the corresponding service.
この関数が用意されているのは、デフォルトで使用される Basic から Uno タイプへの変換では処理しきれない場合があり、そうした状況に対処するためです。こうした状況が発生しうるのは、XPropertySet::setPropertyValue( Name, Value ) や X???Container::insertBy???( ???, Value ) のような Any を使用した一般のインタフェースに Office Basic から アクセスしようとした場合です。これらのタイプは、対応するサービス内でのみ定義されているため、Basic ランタイムは認識することができません。
In this type of situation, Office Basic chooses the best matching type for the Basic type that you want to convert. However, if the wrong type is selected, an error occurs. You use the CreateUnoValue() function to create a value for the unknown Uno type.
このような状況では、Office Basic が、変換する Basic タイプにもっとも合ったタイプを選択します。 ただし、間違ったタイプが選択されると、エラーが発生します。 不明な Uno タイプの値を作成するには、CreateUnoValue() 関数を使用します。
You can also use this function to pass non-Any values, but this is not recommend. If Basic already knows the target type, using the CreateUnoValue() function will only lead to additional converting operations that slow down the Basic execution.
またこの関数を使って Any タイプ以外の値を渡すこともできますが、推奨される使用法ではありません。ターゲットとするタイプが Basic 側で既知である場合に CreateUnoValue() 関数を使用しても、不必要な変換処理が追加されるだけで、Basic の実行速度が低下します。